package com.example.demo;

import org.springframework.web.bind.annotation.*;

@RestController
public class HelloController {
    @RequestMapping("/hello1")
    public String hello(){
        return "hello Spring Booot~";
    }


    @RequestMapping(value ="/hello2",method = {RequestMethod.POST})
    public String hello2(){
        return "这是post";
    }


    @PostMapping("hello3")
    public String hell3(){
        return "post";
    }


    @GetMapping("hello3")
    public String hell4(){
        return "get";
    }

    @RequestMapping("demo1")
    public String demo(String name,String password){
        System.out.println("接收数据name:"+name+", password:" + password);
        return "接收数据name:"+name+", password:" + password;
    }

}
